package tester;

import static org.junit.Assert.*;

import java.util.ArrayList;

import mock.MockChooseCourseLineItem;

import org.junit.Test;

import businesslogicservice.ChooseCourseBLService_Stub;
import businesslogicservice.ChooseCourseLineItem;
import businesslogicservice.ChooseCourseList;
import businesslogicservice.ResultMessage;
import po.ChooseCoursePO;

public class ChooseCourseTest {

	@Test
	public void testChooseCourse() {
		MockChooseCourseLineItem mockChooseCourseLineItem
	     =new MockChooseCourseLineItem(new ChooseCoursePO(121250235, "ZouXuan", 0003, "Software Engineering"));
		ArrayList<ChooseCourseLineItem> chooseCourselist=new ArrayList<>();
		chooseCourselist.add(mockChooseCourseLineItem);
		ChooseCourseList chooseCourseList=new ChooseCourseList(chooseCourselist);
		ChooseCourseBLService_Stub chooseCourseBLService_Stub=new ChooseCourseBLService_Stub();
		ResultMessage resultMessage=chooseCourseBLService_Stub.chooseCourse(chooseCourselist);
		
		assertEquals(ResultMessage.EXIST, resultMessage);
	}

}
